home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 2004 E…tra 100 Bedste Programmer / K-CD_2004_Ekstra_100_Gratis_Programmer.iso / Windows / X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Context Menu Options 4.xpl < prev    next >
Encoding:
XSetup plugin  |  2003-01-29  |  2.7 KB  |  88 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="7"
  3. "COUNT"="3"
  4. "UIPATH 1"="Appearance\Files&Folders\Files"
  5. "UIPATH 2"="System\Advanced Performance Settings"
  6. "NAME"="Start High Priority Context Menu"
  7. "VERSION"="2.51"
  8. "LANGUAGE"="VBScript"
  9. "OSVERSION"="0101011"
  10. "TEXT 1"="Do not add "Start high priority" command for EXE files"
  11. "TEXT 2"="Enable command on context menu for EXE files"
  12. "TEXT 3"="Enable command as default command for EXE files"
  13. "DESCRIPTION 1"="If "Start high priority" is enabled, the command "Start High Priority" will appear if you right-click a EXE file."
  14. "DESCRIPTION 2"="Selecting this command will force Windows to execute the currently selected file with maximum priority."
  15. "DESCRIPTION 3"="The third option will make this the default option for all EXE files. Use this with caution as you may adversely affect system speed and stability if you run too many programs with high priority."
  16. "AUTHOR"="Xteq Systems"
  17. "CONTACTURL"="http://www.xteq.com/"
  18. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  19. "COMMENT 1"="Found at http://snakefoot.homestead.com/files/tweak/winnt/tweak.html (Credits: www.ntfaq.com)" 
  20. "COMMENT 2"="Thanks to Drue Elrick [mailto:delrick@shaw.ca] for the "remove won't work" bug notice!"
  21.  
  22.  
  23.  
  24. Sub Plugin_Initialize 
  25.  s=RegReadValue("HKCR\exefile\Shell\XQSHP\Command\@")
  26.  t=RegReadValue("HKCR\exefile\Shell\@")
  27.  
  28.  if Len(s)>0 then
  29.     Call SetUIElement(2,true)
  30.     if t="XQSHP" then
  31.        Call SetUIElement(3,true)
  32.     end if
  33.  else
  34.     Call SetUIElement(1,true)
  35.  end if 
  36. End Sub
  37.  
  38. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  39.  
  40.  if GetUIElement(1)=true then
  41.     'Disable it!
  42.  
  43.     if RegPathExists("HKCR\exefile\Shell\XQSHP") then
  44.        Call RegDeletePath("HKCR\exefile\Shell\XQSHP\Command")
  45.        Call RegDeletePath("HKCR\exefile\Shell\XQSHP")
  46.        Call RegWriteValue("HKCR\exefile\Shell\@","open",1)
  47.     end if
  48.  
  49.  else
  50.  
  51.     s=""
  52.     bW9x=false
  53.  
  54.     If GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then
  55.        bW9x=true
  56.     else
  57.        bW9x=false
  58.     end if
  59.  
  60.  
  61.     if bW9x=true then
  62.        s=GetWinDir
  63.        s=s & "command.com /c start ""XQSHP"" /high ""%1"""
  64.     else
  65.        'Windows NT/2000
  66.        s=GetWinSysDir
  67.        s=s & "cmd.exe /c start ""XQSHP"" /high ""%1"""
  68.     end if
  69.  
  70.     Call RegWriteValue("HKCR\exefile\Shell\XQSHP\@","Start &High priority",1)
  71.     Call RegWriteValue("HKCR\exefile\Shell\XQSHP\Command\@",s,1)
  72.  
  73.     ' START Neil's new code for the default action option
  74.     if GetUIElement(3)=true then
  75.        Call RegWriteValue("HKCR\exefile\Shell\@","XQSHP",1)
  76.     else
  77.        Call RegWriteValue("HKCR\exefile\Shell\@","open",1)
  78.     end if
  79.     ' bugfixed by TeX HeX
  80.  
  81.  end if
  82.  
  83.  
  84. End Sub
  85.  
  86. Sub Plugin_Terminate 
  87. End Sub
  88.